package com.runen.infinitemovement.fragment;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import com.runen.infinitemovement.R;
import com.runen.infinitemovement.adapter.ColumnActivityAdapter;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;

public class ColumnActivityFragment extends Fragment {
    @BindView(R.id.rv_column_activity)
    RecyclerView rvColumnActivity;
    private int point;
    private View view;
    private ColumnActivityAdapter columnActivityAdapter;
    private List<String> stringList = new ArrayList<>();

    public ColumnActivityFragment(int position) {
        point = position;
    }

    @Nullable
    @Override
    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        if (view == null) {
            view = inflater.inflate(R.layout.fragment_column_activity, container, false);
            ButterKnife.bind(this, view);
        }
        initView();
        return view;
    }

    private void initView() {
        LinearLayoutManager layoutManager = new LinearLayoutManager(getActivity());
        layoutManager.setOrientation(LinearLayoutManager.VERTICAL);
        rvColumnActivity.setLayoutManager(layoutManager);
        columnActivityAdapter = new ColumnActivityAdapter(getActivity());
        rvColumnActivity.setAdapter(columnActivityAdapter);
//        for (int i = 0; i < 3; i++) {
//            stringList.add(i + "ss");
//        }
//        columnActivityAdapter.setNewData(stringList);

    }
}
